﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SudokuHelper.Model.Values;

namespace SudokuHelper.Model {
    public class ValueDetector : IValueVisitor {
        private readonly byte? value;

        #region Constructors

        public ValueDetector(byte? value) {
            this.value = value;
        }

        #endregion

        #region Implementation of IValueVisitor

        public object Visit(UserValue value, object arg) {
            return false;
        }

        public object Visit(CalculatedValue value, object arg) {
            return false;
        }

        public object Visit(ValueRange valueRange, object arg) {
            return valueRange.AvailableValues.Contains(value.Value);
        }

        #endregion
    }
}
